package com.egitim.model;

 
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import org.apache.wicket.IClusterable;

 


/**
 * Simple "POJO" bean for guestbook comments.
 * 
 *  @author Murat Hunoglu
 */
@Entity(name="etiket")
@Table(uniqueConstraints = @UniqueConstraint(columnNames = "text"))
public class Etiket  extends BaseEntity  implements IClusterable 
{
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
 
	private String text;
	
	
	@ManyToMany(cascade=CascadeType.ALL)
	  @JoinTable(name = "AnaGonderiEtiket",
	    joinColumns = {
	      @JoinColumn(name="etiketId")           
	    },
	    inverseJoinColumns = {
	      @JoinColumn(name="anaGonderiId")
	    }
	  )
	  @Column
	  private List<AnaGonderi> anaGonderiList;
	
	
	
    public List<AnaGonderi> getAnaGonderiList() {
		return anaGonderiList;
	}

	public void setAnaGonderiList(List<AnaGonderi> anaGonderiList) {
		this.anaGonderiList = anaGonderiList;
	}

	/**
     * Constructor
     */
    public Etiket()
    {
    }

    /**
     * Copy constructor
     * 
     * @param comment
     *            The comment to copy
     */
    public Etiket(final Etiket comment)
    {
        this.text = comment.text;
        
    }

    /**
     * @return Returns the text.
     */
    
    public String getText()
    {
        return text;
    }

    /**
     * @param text
     *            The text to set.
     */
    public void setText(String text)
    {
        this.text = text;
    }

	@Override
	public String getDisplayText() {
		// TODO Auto-generated method stub
		return null;
	}

     
}
